<template>
  <template v-for="item in accountStore.getPlugin()">
    <template v-if="!item.menuHidden">
      <t-menu-item v-if="!item.menu" :value="item.url()"> {{ item.name() }} </t-menu-item>
      <t-submenu v-else :value="item.url()" :title="item.name()">
        <t-menu-item v-for="menu in item.menu" :value="menu.url"> {{ menu.name }} </t-menu-item>
      </t-submenu>
    </template>
  </template>
</template>

<script setup>
  import { ref } from 'vue'
  import app from '@/app'
  import accountStore from '@/store/account'
  import plugin from './index'

  // 载入全量插件
  plugin.load(app.plugin.list)
  
</script>

<style lang="scss">
  @import '@/style/global';
  
</style>